# -*- coding: utf-8 -*-

import pymysql
import time

db = pymysql.connect(host="127.0.0.1", port=3306, user="root", password="root", db="test", charset="utf8")
cursor = db.cursor()

def mysql_checking(mobile_no):
    sql_demand = "SELECT 1 FROM baidu_aicaigou_spider WHERE mobile_no='" + mobile_no + "' LIMIT 1"

    demand = cursor.execute(sql_demand)
    db.commit()
    if demand > 0:
        print('联系方式已存在')
        return False
    else:
        return True